using KL.Standard.Model.ViewModels.Queue;

namespace KL.Standard.Domain.MessageQueue;
/// <summary>
/// 消息生产者
/// </summary>
/// <typeparam name="T"></typeparam>
public interface IBaseQueueProductor<T>
{
    /// <summary>
    /// direct 发送信息
    /// </summary>
    /// <param name="msg"></param>
    /// <param name="queueName"></param>
    /// <param name="routeKey"></param>
    /// <param name="exchangeName"></param>
    /// <typeparam name="K"></typeparam>
    void PublishMsg<K>(MQueueItem<K> msg, string queueName, string routeKey, string exchangeName );

    /// <summary>
    /// 广播消息（fanout）
    /// </summary>
    /// <param name="msg"></param>
    /// <param name="queueNames"></param>
    /// <param name="exchangeName"> </param>
    /// <typeparam name="T"></typeparam>
    void BroadcastMsg<K>(MQueueItem<K> msg, List<string> queueNames, string exchangeName);
}